<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <ul>
    <li id="flag">鱼香肉丝</li>
    <li>宫保鸡丁</li>
    <li>糖醋里脊</li>
    <li>凉拌黄瓜</li>
  </ul>
  <script>
    // 根据id属性获取元素
    var Obox = document.getElementById('flag');
    console.log(Obox);
  </script>
</body>
</html>